package com.game;

import android.app.Activity;
import android.os.Bundle;  

import android.view.KeyEvent;
import android.view.Window;  

import android.view.WindowManager; 

public class MainActivity extends Activity {  

	private MySurfaceView mSurfaceView;
    /** Called when the activity is first created. */  
    @Override  
    public void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState);  
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);  

        this.requestWindowFeature(Window.FEATURE_NO_TITLE);  

        mSurfaceView = new MySurfaceView(this);
        setContentView(mSurfaceView);
        //setContentView(new MyView(this));
    }  
    
    @Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
    	mSurfaceView.onKeyDown(keyCode);
    	
    	if (keyCode == KeyEvent.KEYCODE_BACK) {
 			this.finish();
 		} else {
 			
 		}
		return true;
	}
} 